package course.d1217;
/*
时间相关的类：
Date            SimpleDateFormat         Calender

1.String     -->      Date         -->     Calender
步骤：
String s = "2020-10-1"
SimpleDateFormat  sdf = new SimpleDateFormat("yyyy-MM-dd");
Date  date  = sdf.parse(s);
Calender cal = Calender.getInstance();
cal.setTime(date);

2.Calender   -->      Date         -->     String
Calender cal = Calender.getInstance();
Date date = cal.getTime();
SimpleDateFormat  sdf = new SimpleDateFormat("yyyy-MM-dd");
String time = sdf.format(date);

 */
public class demo04 {
    public static void main(String[] args) {

    }
}
